<%--
	fileName      : /opermgmt/WebContent/customermgmt/querypro.jsp
	author        : lenovo
	createDate    : 2016-10-26  11:13:54
	lastModifier  : lenovo
	lastModifyDate: 2016-10-26  11:13:54
	description   : 请添加描述
--%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="ctp-tag" prefix="ctp" %>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>查询产品</title>
	<ctp:include items="link,borderlayout,checkboxgroup,checkbox,radiogroup,radio,groupbox,button,message_ex,validator,label,textfield,combobox,textarea,form,gridlayout,menus,panel,toolbar,grid,datepicker,radiogroup,multiselect"/>
	<script type='text/javascript' kind='variant'>
			var borderlayout1;
			var gridlayout;
	        var call_status;
	        var submit_button;
	        var close_button;
	        var panel;
	        var multiselect;
	        var textfield1;
	        var toolbar1;
	        var user_id='<ctp:out name="sessCtx.user.id"/>';
	        var selText='<ctp:out name="selectedText"/>';
	        var selValue='<ctp:out name="selValue"/>';
        </script>
        <script type='text/javascript' kind='event'>
			function init(){
				multiselect.setValue(selValue);
			}
			
		    function submit(){
		    	var text=multiselect.getSelectedTexts();
		    	var value=multiselect.getValue();
		    	var data={};
		    	data.text=text;
		    	data.value=value;
			    parent.ctpMSB.doHandler(data,true);
			}
			function close(){
				parent.ctpMSB.close();
			}
        </script>
         <script type='text/javascript' kind='ui'>
         function initUI(){
        	 textfield1 = new ctp.ui.textfield({
					id:'textfield1',
					type:'text'
				});
        	 toolbar1 = new ctp.ui.toolbar({
	            	id: 'toolbar1',
                 border: 'bottom',
                 leftItems: [{
                     id: "textfield1",
                     type: 'textfield',
                     text: '搜索：',
                     object: textfield1
                 }, {
                     id: "buttonsearchleft",
                     type: 'button',
                     text: '搜索待选区域',
                     onClick:function(){
								multiselect.searchByText(textfield1.getValue(),'left');
							}
                 }, {
                     id: "buttonsearchright",
                     type: 'button',
                     text: '搜索已选区域',
                     onClick:function(){
								multiselect.searchByText(textfield1.getValue(),'right');
							}
                 }, {
                     id: "buttonsearchall",
                     type: 'button',
                     text: '搜索全部区域',
                     onClick:function(){
								multiselect.searchByText(textfield1.getValue(),'all');
							}
                 }]
	            });
        	 multiselect = new ctp.ui.multiselect({
        			id:'multiselect',
        			width: '100%',
        			icon:'edit',
        			viewRow :'10',
        			remote:{
        				'url':'<ctp:url href="productfilesmain.flowc" flowActionName="queryprod" params="locale=sessCtx.Language;"/>&userId='+user_id,
        				'textField':'text',
        				'valueField':'value',
        				'titleField':'title',
        				'selectedField':false
        			},  
        			onChange:function(){}
        	});
         	
        	 submit_button = new ctp.ui.button({
                 id:'submit_button',
                 width: '20%',
                 text:'确定',
         		onClick:submit
             });

        	 close_button = new ctp.ui.button({
                 id:'close_button',
                 width: '20%',
                 text:'关闭',
         		onClick:close
             });
             
        	 gridlayout= new ctp.ui.gridlayout({
     			id: 'gridlayout',
     			align: 'center',
     			width: '95%',
     			cols: 2,
     			items: [
						[{colspan: 2,colwidth:'80%',label: {text: '', width: '100%'}, align: 'center',element:toolbar1}],
              			[{colspan: 2,colwidth:'80%',label: {text: '', width: '100%'}, align: 'center',element:multiselect}],
             			[{align: 'right',element:submit_button},{align: 'left',element:close_button}],
     			] 
				});
				
	        	 panel = new ctp.ui.panel({
	         	    id:'panel1',
	         	    title:'选择产品',	
	         	    items:[gridlayout]
	         	});
		         	
                borderlayout1 = new ctp.ui.borderlayout({
                    type: '1C',
                    center__size: 1.0,
                    //north__items:[panel],
					  center__items:[gridlayout],
					  center__scrollable:true,
                    renderTo: 'body'
                });

                init();
            };
            </script>     
	</head>
	<body onload='initUI();'>
	<ctp:form name="queryForm" method="post" action="productfilesmain.flowc" flowActionName="">
	</ctp:form>
	</body>
</html>

<%--
	date        :
	modifyReason:
--%>